from ctaf_core.ctaf_objects.base_exception import CTAFbaseException
from ctaf_facade.enumerations.error_code_enum import ErrorCodeEnum


class CtafFactory:
    ctaf_instance = None

    @staticmethod
    def get_ctaf_instance():
        if not CtafFactory.ctaf_instance:
            raise CTAFbaseException(ErrorCodeEnum.NO_CTAF_INSTANCE)
        return CtafFactory.ctaf_instance